#[derive(Debug)]
struct Point<T> {
    x: T,
    y: T,
}

fn main() {
    // 定义结构体时，x和y泛型相同，但是使用的时候不一致
    // let wont_work = Point { x: 5, y: 4.0 };
    // error[E0308]: mismatched types   ^^^ expected integer, found floating-point number
    let wont_work = Point { x: 5, y: 4 };
    println!("{:?}, x={}, y={}", wont_work, wont_work.x, wont_work.y);
}
